/*
 * GToe: Gtk+ TicTacToe
 * player.h: player structure
 *
 * Copyright (C) 2010 Dani El-Soufi <danisoufi@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <form.h>
#include <string.h>

/* Defines max chars for the player names */
#define MAX_PNAME_LEN 10

extern FORM *form;
extern FIELD **field;

/* Players */
extern PLAYER *p1, *p2;

typedef struct _player_struct
{
    unsigned char const name[MAX_PNAME_LEN];
    unsigned short const stone;
    unsigned short wins;
    unsigned short looses;
    unsigned short starts;
} PLAYER;

/* initialize player */
PLAYER new_player(void);

/* get player's name */
char * get_pname(void);

void get_player1_move(void);

void get_player2_move(void);
